<?php
namespace app\model;

use think\Model;

class Category extends Model
{
    // 定义时间戳字段名
    protected $_createTime         = 'create_time';
    protected $_updateTime         = 'update_time';
    protected $_autoWriteTimestamp = true;          // 自动写入时间戳
    protected $_deleteTime         = 'delete_time'; // 软删除

    public function products()
    {
        return $this->hasMany(Product::class);
    }

}
